<template>
  <div class="home-container">
    <div class="header">
      <h1 class="title">AI超级应用平台</h1>
      <p class="subtitle">探索AI的无限可能，开启智能对话新体验</p>
    </div>
    
    <div class="app-list">
      <div class="app-card" @click="navigateTo('/love-app')" data-app="love">
        <div class="app-icon">
          <i class="icon-heart">❤️</i>
        </div>
        <div class="app-content">
          <h2>AI恋爱大师</h2>
          <p>与AI谈一场甜蜜的恋爱，体验不一样的情感互动</p>
          <button class="btn app-btn">立即体验</button>
        </div>
      </div>
      
      <div class="app-card" @click="navigateTo('/super-agent')" data-app="agent">
        <div class="app-icon">
          <i class="icon-robot">🤖</i>
        </div>
        <div class="app-content">
          <h2>AI超级智能体</h2>
          <p>强大的AI智能体，解答你的各种问题，提供专业建议</p>
          <button class="btn app-btn">立即体验</button>
        </div>
      </div>
    </div>
    
    <footer class="footer">
      <p>© {{ new Date().getFullYear() }} AI超级应用平台 - 让AI改变生活</p>
    </footer>
  </div>
</template>

<script>
export default {
  name: 'Home',
  methods: {
    navigateTo(path) {
      this.$router.push(path)
    }
  }
}
</script>

<style scoped>
.home-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: linear-gradient(135deg, #f5f7fa, #e4e8f0);
}

.header {
  text-align: center;
  margin: 40px 0;
  animation: fadeDown 0.8s ease;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.title {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
  color: var(--text-light);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

.app-list {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin: 40px 0;
  flex: 1;
}

.app-card {
  width: 340px;
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  animation: fadeUp 0.8s ease;
  animation-fill-mode: both;
}

.app-card[data-app="love"] {
  animation-delay: 0.1s;
}

.app-card[data-app="agent"] {
  animation-delay: 0.3s;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.app-icon {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.app-icon::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
  top: -80%;
  left: -80%;
  transition: all 0.6s ease;
}

.app-card:hover .app-icon::before {
  top: -20%;
  left: -20%;
}

.app-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.app-card h2 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 1.5rem;
  font-weight: 600;
}

.app-card p {
  color: var(--text-light);
  margin-bottom: 25px;
  line-height: 1.6;
  flex: 1;
}

.app-btn {
  align-self: center;
  width: 100%;
  margin-top: auto;
}

.footer {
  text-align: center;
  margin-top: 40px;
  color: var(--text-lighter);
  font-size: 0.9rem;
  padding: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .title {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .app-card {
    width: 100%;
    max-width: 340px;
  }
}
</style> 